/*
 * @(#)OXMapper.java    May 17, 2010
 *
 * Copyright 2009 Nyber Shanghai, Inc. All rights reserved.
 */

package com.common.oxm;

import java.io.IOException;

/**
 * Object to XML mapping functionality.
 *
 * @author nickevin@gmail.com
 * @version May 17, 2010 1:40:39 PM
 */

public interface OxMapper {

	/**
	 * @param object
	 * 			POJO
	 * @param filename
	 * 			file name
	 * @throws IOException
	 */
	void writeObjectToXml(Object object, String filename) throws IOException;

	/**
	 * @param clazz
	 * @param filename
	 * @return
	 * @throws IOException
	 */
	<T> T readObjectFromXml(Class<T> clazz, String filename) throws IOException;
}
